import 'package:flutter/material.dart';

main() => runApp(MyApp());

// 生成代码快捷键  stl
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: GLHomePage(),
    );
  }
}

class GLHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("基础的widget"),
        ),
        body: GLHomeContent());
  }
}

class GLHomeContent extends StatefulWidget {
  const GLHomeContent({super.key});

  @override
  State<GLHomeContent> createState() => _GLHomeContentState();
}

class _GLHomeContentState extends State<GLHomeContent> {
  @override
  Widget build(BuildContext context) {
    return Container(
        color: Colors.red,
        width: 200,
        height: 200,
        alignment: Alignment(-1, -1),
        padding: EdgeInsets.all(20),
        margin: EdgeInsets.all(20),
        child: Icon(
          Icons.pets,
          size: 20,
          color: Colors.white,
        ),
        // transformAlignment: Matrix4.rotationZ(50),
        decoration: BoxDecoration(
            color: Colors.red,
            border: Border.all(width: 5, color: Colors.red),
            borderRadius: BorderRadius.circular(100),
            boxShadow: [
              BoxShadow(
                  color: Colors.orange,
                  offset: Offset(10, 10),
                  spreadRadius: 5,
                  blurRadius: 10),
              BoxShadow(
                  color: Colors.orange,
                  offset: Offset(-10, 10),
                  spreadRadius: 5,
                  blurRadius: 10),
            ]));
  }
}
